﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlInNghiepVuDoiGia.ascx.cs" Inherits="UserControl_ControlInNghiepVuDoiGia" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register src="~/UserControl/ControlReportViewer.ascx" tagname="ReportViewerControl" tagprefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script type="text/javascript">
    function pageLoad() {
        $("#<%= imgBtnAdd.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }
</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>     
    <div class="direct_container_right_titletop">
                    In nghiệp vụ đổi giá
    </div>
     <!-- Button chuc nang-->
                <div class="direct_container_main">
                    <asp:ImageButton ID="imgBtnAdd" onclick="imgBtnAdd_Click" CausesValidation="false" ImageUrl="~/Images/Refresh.png" Width="32px" Height="32px" runat="server" />
                   
                </div>
                <!-- End Button chuc nang-->
    <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#CCFFFF"
            Font-Names="Arial" Width="100%">
        <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Danh sách nghiệp vụ đổi giá" TabIndex="0">
            <ContentTemplate>  
             <div class="direct_container_main">
                    <div class="direct_container_form_right">              
                   <table width="100%">
                       <tr>
                                <td>
                                    <asp:GridView ID="grdvNghiepVuDoiGiaLists" runat="server" 
                                        AutoGenerateColumns="False" DataKeyNames="docno" EnableModelValidation="True" 
                                        ForeColor="#333333" GridLines="None" 
                                        onpageindexchanging="grdvNghiepVuDoiGiaLists_PageIndexChanging" 
                                        OnSelectedIndexChanged="grdvNghiepVuDoiGiaLists_SelectedIndexChanged" 
                                        Width="100%">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Số hóa đơn">
                                                <HeaderTemplate>
                                                    Số chứng từ
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <%# Eval("docno")%>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Ngày">
                                                <HeaderTemplate>
                                                    Ngày
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <%# Eval("docdate")%>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Đã in">
                                                <HeaderTemplate>
                                                    Đã in
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <input ID="chkActive" runat="server" checked='<%# Eval("printed") %>' 
                                                        disabled="disabled" style="width:10px" type="checkbox" /> &nbsp;
                                                    <%--<asp:CheckBox runat="server" ID="chkActive" Enabled="false" CausesValidation="false" Checked='<%# Eval("Active") %>' Width="10px" />--%>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                                <ItemStyle Height="40px" HorizontalAlign="Center" Width="100px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Xem và in">
                                                <HeaderTemplate>
                                                    Xem và In
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="false" 
                                                        CommandName="Select" ImageUrl="~/Images/icon_print.png" ToolTip="Xem và In" />
                                                </ItemTemplate>
                                                <HeaderStyle Width="70px" />
                                                <ItemStyle HorizontalAlign="Center" Width="70px" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#0066CC" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                    </asp:GridView>
                                </td>
                            </tr>
                       
                   </table>
           </div>
                </div>
                </ContentTemplate>
            </cc1:TabPanel>
            
            <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Chi tiết in" TabIndex="1">
                <ContentTemplate>
                    <uc1:ReportViewerControl ID="ControlReportViewer1" runat="server" />
                    
                </ContentTemplate>
            </cc1:TabPanel>                
        </cc1:TabContainer>
           
    </ContentTemplate>            
</asp:UpdatePanel>